function getQueryVariable(variable) {
    // 用于获取路径中参数，确定菜单的聚焦位置
    const query = window.location.search.substring(1);
    const vars = query.split("&");
    for (let i=0; i<vars.length; i++) {
        const pair = vars[i].split("=");
        if(pair[0] === variable){return pair[1];}
    }
    return '';
}

export {
    getQueryVariable
}